package com.qyhl.shop.shop.coupon.adv;

import com.qyhl.webtv.commonlib.entity.shop.ShopAdvDetailBean;

public class ShopCouponAdvPresenter implements ShopCouponAdvContract.ShopCouponAdvPresenter {
    private ShopCouponAdvContract.ShopCouponAdvView mView;
    private ShopCouponAdvModel mModel;

    public ShopCouponAdvPresenter(ShopCouponAdvContract.ShopCouponAdvView mView) {
        this.mView = mView;
        this.mModel = new ShopCouponAdvModel(this);
    }

    @Override
    public void getDetail(int advId,boolean isAdv) {
        mModel.getDetail(advId,isAdv);
    }

    @Override
    public void getCoupon(String phoneNum, int couponId, String sign) {
        mModel.getCoupon(phoneNum, couponId, sign);
    }

    @Override
    public void setDetail(ShopAdvDetailBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void getCouponResult(String msg) {
        mView.getCouponResult(msg);
    }
}
